<%@page import="warehouse.AccountBean"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>主页</title>
</head>
<link rel="stylesheet" href="layui/css/layui.css">
<script src="layui/layui.js"></script>
<body class="layui-layout-body">
<%
	//如果没登录则先登录
	AccountBean account = (AccountBean)session.getAttribute("account");
	
	if(account==null){
		%>
		<script>
		layui.use('layer', function(){
			  var layer = layui.layer;
			  layer.alert('请先登录', function(index){
					window.location.href="login.jsp";
				}); 
			});  
		</script>
		<%	
		return;//不继续向下执行
	}

%>
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header layui-bg-blue">
			<div class="layui-logo" style="color:white">仓库管理系统</div>
			<!-- 头部区域（可配合layui已有的水平导航） -->
			<ul class="layui-nav layui-layout-left layui-bg-blue">
				<li class="layui-nav-item layui-this">
					<a href="warehouse_list.jsp" target="frame">仓库信息</a>
				</li>
				<li class="layui-nav-item"><a href="supply_list.jsp" target="frame">供应管理</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="supply_form.jsp" target="frame">添加供应记录</a>
						</dd>
						<dd>
							<a href="supply_list.jsp" target="frame">供应信息</a>
						</dd>
					</dl>
				</li>
				<li class="layui-nav-item"><a href="order_list.jsp" target="frame">订单管理</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="order_form.jsp" target="frame">添加订单</a>
						</dd>
						<dd>
							<a href="order_list.jsp" target="frame">订单信息</a>
						</dd>
					</dl>
				</li>
				<li class="layui-nav-item"><a href="">人员管理</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="supplier_list.jsp" target="frame">供应商管理</a>
						</dd>
						<dd>
							<a href="client_list.jsp" target="frame">客户管理</a>
						</dd>
						<dd>
							<a href="staff_list.jsp" target="frame">职工管理</a>
						</dd>
					</dl>
				</li>
			</ul>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item">
				<a href="javascript:;"> 
					
					<%=account.getUsername() %>
				</a>
				</li>
				<li class="layui-nav-item"><a href="logout.jsp">注销</a></li>
			</ul>
		</div>
	
	
	</div>
	
	<iframe  name="frame" id="frame" src="warehouse_list.jsp" width="100%" height="600px"></iframe>
	
	<script src="../src/layui.js"></script>
	<script>
		//JavaScript代码区域
		layui.use('element', function() {
			var element = layui.element;

		});
	</script>
</body>
</html>